package com.esun.util;

import android.content.Context;

public class DipToPx {

	
	/** 
	* @Title: dip2px 
	* @Description: (dip转成px) 
	* @param: @param context
	* @param: @param dipValue
	* @param: @return    设定文件 
	* @return: int    返回类型 px值
	* @throws 
	*/
	public static int dip2px(Context context, float dipValue) {
		final float scale = context.getResources().getDisplayMetrics().density;
		return (int) (dipValue * scale + 0.5f);
	}

}
